package sh.wn36.vehiclemanage.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import sh.wn36.vehiclemanage.entity.Car;
import sh.wn36.vehiclemanage.entity.RepairRecord;
import sh.wn36.vehiclemanage.mapper.CarMapper;
import sh.wn36.vehiclemanage.service.RepairRecordService;
import org.springframework.stereotype.Service;
import sh.wn36.vehiclemanage.mapper.RepairRecordMapper;
import sh.wn36.vehiclemanage.xzh.RepairInfo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xk
 * @since 2021-04-26
 */
@Service
public class RepairRecordServiceImpl extends ServiceImpl<RepairRecordMapper, RepairRecord> implements RepairRecordService {

  @Autowired
  private RepairRecordMapper repairRecordMapper;



    @Override
    public IPage<RepairInfo> getList(Page<RepairInfo> page) {
        return repairRecordMapper.ListByPage(page);
    }

    @Override
    public IPage<RepairInfo> getListByCarNo(Page<RepairInfo> page,String text) {
        return repairRecordMapper.ListByCarNo(page,text);
    }

    @Override
    public IPage<RepairInfo> getListByUnitName(Page<RepairInfo> page,String text) {
        return repairRecordMapper.ListByUnitName(page,text);
    }

    @Override
    public IPage<RepairInfo> getListByRname(Page<RepairInfo> page,String text) {
        return repairRecordMapper.ListByRname(page,text);
    }



    @Override
    public RepairInfo getDetailById(Integer id) {
        return repairRecordMapper.getDetailById(id);
    }

    @Override
    public List<Map<String, Object>> getTable() {
        return repairRecordMapper.getTable();
    }

    @Override
    public List<Map<String, Object>> getTableByCarId(Integer id) {
        return repairRecordMapper.getTableByCarId(id);
    }
}
